﻿<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" CodeBehind="collaboration_pesonal_edit.aspx.cs" Inherits="Ccit.Mgoa.Collaboration.collaboration_pesonal_edit" %>

<%@ Register src="../USERCONTROLS/AttachUpLoad.ascx" tagname="AttachUpLoad" tagprefix="uc1" %>

<%@ Register TagPrefix="ccit" Namespace="Ccit.ServerControls" Assembly="Ccit.ServerControls.ActionForm" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
    <script language="javascript" type="text/javascript" src="../script/jwindow.js"></script>
    <script language="javascript" type="text/javascript" src="../script/jquery.js"></script>
    <script language="javascript" type="text/javascript" src="../script/jsonlib.js"></script>
    <script language="javascript" type="text/javascript" src="../script/jbase64.js"></script>
    <script language="javascript" type="text/javascript">
    <!--
        function doRangeSelect(ctrlRangeType, ctrlRangeId, ctrlRangeName)
        {
            OpenRangeSelect(ctrlRangeType, ctrlRangeId, ctrlRangeName, ",");
        }
        
        function doSave()
        {
            if(CheckValue())
            {
                __doPostBack("lnkSave","");
            }
        }
        
        function doCancel()
        {
            window.location.href="collaboration_pesonal_index.aspx";
        }
        
        function doUploadFiles()
        {
            OpenUpLoadPage();
        }
        
        function CheckValue()
        {
            var oTitle=jQuery.trim($get("txtTitle").value);
            if(oTitle=="")
            {
                alert("请填写协作标题！");
                return false;
            }            
                        
            var oPublishDate=jQuery.trim($get("txtPublishDate").value);
            if(oPublishDate=="")
            {
                alert("请选择发布日期！");
                return false;
            }
            var oFinishDate=jQuery.trim($get("txtFinishDate").value);
            if(oFinishDate=="")
            {
                alert("请选择终止日期！");
                return false;
            }
            var oCurDate=new Date().format("yyyy-MM-dd");
            if(oCurDate>oFinishDate)
            {
                alert("终止日期不能小于当前日期！");
                return false;
            }
            if(oPublishDate>oFinishDate)
            {
                alert("终止日期不能小于发布日期！");
                return false;
            }
            var oRangeType=$get("hdPublishRangeType").value;
            var oRangeId=$get("hdPublishRange").value;
            if(oRangeId==""||oRangeType=="")
            {
                alert("请选择发布范围！");
                return false;
            }
            return true;
        }
    //-->
    </script>
</head>
<body>
    <ccit:ActionForm id="form1" runat="server">
        <input type="hidden" id="hdId" runat="server" />
        <input type="hidden" id="hdStatus" runat="server" />
        <asp:LinkButton ID="lnkSave" runat="server" onclick="lnkSave_Click"></asp:LinkButton>
        <asp:ScriptManager ID="ScriptManager1" EnablePageMethods="true" runat="server"></asp:ScriptManager>
        <table border="0" cellpadding="0" cellspacing="0" align="center" width="98%" class="tbToolbar">
            <tr>
                <td align="left">
                    <div class="tbSeparator"></div>
                </td>
                <td align="left" class="titlebar" style="width:100%">
                    <nobr>
                        协作管理-协作编辑
                    </nobr>
                </td>
                <td align="right">
                    <div class="tbSeparatorEnd"></div>
                </td>
            </tr>
        </table>
        <table id="Table1" border="0" cellpadding="0" cellspacing="0" align="center" class="tableborder" runat="server" width="98%">
            <tr>
                <td style="width:100%" align="center">
                    <asp:Panel ID="Panel1" Width="95%" runat="server" BorderStyle="None" GroupingText="基本信息" HorizontalAlign="Center">
                        <table id="Table2" border="0" cellpadding="0" cellspacing="0" align="center" runat="server" width="98%">
                            <tr>
                                <td style="width:20%;border-left:1px solid" align="right" class="pformleft">
                                    发布人：
                                    <input type="hidden" id="hdPublisherId" runat="server" />
                                </td>
                                <td id="tdPulisher" runat="server" style="width:30%" class="pformrightline"></td>
                                <td style="width:20%" align="right" class="pformleft">
                                    发布机构：
                                </td>
                                <td style="width:30%" runat="server" id="tdPublishOrg" class="pformrightline"></td>
                            </tr>
                            <tr>
                                <td style="width:20%;border-left:1px solid" align="right" class="pformleft">
                                    创建时间：
                                </td>
                                <td style="width:30%" id="tdCreateDate" runat="server" class="pformrightline"></td>
                                <td style="width:20%" align="right" class="pformleft">
                                    协作类型：
                                </td>
                                <td style="width:30%" class="pformrightline">
                                    <select id="selCollaborativeType" style="width:99.4%" runat="server" class="inputselect"></select>
                                </td>
                            </tr>
                            <tr>
                                <td class="pformleft" align="right" style="border-left:1px solid">
                                    协作标题：
                                </td>
                                <td colspan="3" class="pformrightline">
                                    <input type="text" id="txtTitle" class="input" style="width:99.4%" runat="server" />
                                </td>
                            </tr>
                            <tr>
                                <td class="pformleft" style="border-left:1px solid" align="right">
                                    协作描述：
                                </td>
                                <td colspan="3" class="pformrightline">
                                    <asp:TextBox ID="txtDesc" runat="server" TextMode="MultiLine" Rows="3" style="width:99.4%" CssClass="inputarea"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td style="width:20%;border-left:1px solid" align="right" class="pformleft">
                                    发布时间：
                                </td>
                                <td style="width:30%" class="pformrightline">
                                    <nobr>
                                        <input type="text" id="txtPublishDate" runat="server" class="input" />
                                        <img src="../images/toolbar/Calendar.gif" alt="发布时间" style="cursor:pointer" class="getdate" relaobj="txtPublishDate" />
                                    </nobr>
                                </td>
                                <td style="width:20%" align="right" class="pformleft">
                                    终止时间：
                                </td>
                                <td style="width:30%" class="pformrightline">
                                    <nobr>
                                        <input type="text" id="txtFinishDate" runat="server" class="input" />
                                        <img src="../images/toolbar/Calendar.gif" alt="终止时间" style="cursor:pointer" class="getdate" relaobj="txtFinishDate" />
                                    </nobr>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="4" class="pformright">&nbsp;</td>
                            </tr>
                        </table>
                    </asp:Panel>
                </td>
            </tr>
            <tr>
                <td style="width:100%" align="center">
                    <asp:Panel ID="Panel2" Width="95%" runat="server" BorderStyle="None" GroupingText="附件" HorizontalAlign="Center">
                        <table id="Table3" border="0" cellpadding="0" cellspacing="0" align="center" runat="server" width="98%">
                            <tr>
                                <td style="width:20%;border-left:1px solid" align="right" class="pformleft">
                                    附件：
                                </td>
                                <td style="width:80%" class="pformrightline">
                                    <a href="javascript:doUploadFiles()">上传附件</a><uc1:AttachUpLoad ID="attUpload" ShowStyle="1" runat="server" />
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2" class="pformright">&nbsp;</td>
                            </tr>
                        </table>
                    </asp:Panel>
                </td>
            </tr>
            <tr>
                <td style="width:100%" align="center">
                    <asp:Panel ID="Panel3" Width="95%" runat="server" BorderStyle="None" GroupingText="发布范围" HorizontalAlign="Center">
                        <table id="Table4" border="0" cellpadding="0" cellspacing="0" align="center" runat="server" width="98%">
                            <tr>
                                <td style="width:20%;border-left:1px solid" align="right" class="pformleft">
                                    选择：
                                </td>
                                <td style="width:80%" class="pformrightline">
                                    <nobr>
                                        <asp:TextBox runat="server" ID="txtPublishRange" TextMode="MultiLine" CssClass="inputarea" Rows="3" Width="90%"></asp:TextBox>                     
                                        <%-- 存储范围值 --%>
                                        <input type="hidden" id="hdPublishRange" runat="server" />
                                        <%-- 存储范围类型 --%>
                                        <input type="hidden" id="hdPublishRangeType" runat="server" />
                                        <a href="javascript:doRangeSelect('hdPublishRangeType','hdPublishRange','txtPublishRange')" class="linktext"><img src="../images/user.gif" /></a>
                                    </nobr>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2" class="pformright">&nbsp;</td>
                            </tr>
                        </table>
                    </asp:Panel>
                </td>
            </tr>
            <tr id="trRemind" runat="server">
                <td style="width:100%" align="center">
                    <asp:Panel ID="Panel4" Width="95%" runat="server" BorderStyle="None" GroupingText="提醒" HorizontalAlign="Center">
                        <table id="Table5" border="0" cellpadding="0" cellspacing="0" align="center" runat="server" width="98%">
                            <tr>
                                <td style="width:20%;border-left:1px solid" align="right" id="tdMsgTitle" class="pformleft">
                                    在线消息：
                                </td>
                                <td style="width:30%" class="pformrightline" id="tdMsgRemind">
                                    <input type="radio" id="radYes" name="radRemind" runat="server" class="radio" /><label for="radYes">是</label>
                                    <input type="radio" id="radNo" name="radRemind" runat="server" class="radio" /><label for="radNo">否</label>
                                </td>
                                <td style="width:20%" id="tdPhoneTitle" align="right" class="pformleft">
                                    手机短信：
                                </td>
                                <td style="width:30%" id="tdPhoneRemind" class="pformrightline">
                                    <input type="radio" id="radYes1" name="radPhoneRemind" runat="server" class="radio" /><label for="radYes1">是</label>
                                    <input type="radio" id="radNo1" name="radPhoneRemind" runat="server" class="radio" /><label for="radNo1">否</label>
                                </td>
                                <td style="width:50%" id="tdNbsp" colspan="2" class="pformrightline">&nbsp;</td>
                            </tr>
                            <tr>
                                <td colspan="4" class="pformright">&nbsp;</td>
                            </tr>
                        </table>
                    </asp:Panel>
                </td>
            </tr>
            <tr>
                <td class="pformstrip" align="center">
                    <input type="button" runat="server" id="btnSave" class="button" onclick="doSave()" value="保存" />&nbsp;&nbsp;
                    <input type="button" runat="server" id="btnCancel" class="button" onclick="doCancel()" value="取消" />
                </td>
            </tr>
        </table>
    </ccit:ActionForm>
</body>
</html>
